//
// Created by 12992 on 24-10-1.
//

#ifndef MEDIA_PACKET_H
#define MEDIA_PACKET_H

extern "C" {
struct AVPacket;
}

namespace utils
{
    class media_packet
    {
    public:
        media_packet() = default;

        explicit media_packet(AVPacket* packet);

        media_packet(media_packet&& packet) noexcept;

        media_packet(const media_packet& packet);

        media_packet& operator=(const media_packet& packet);

        media_packet& operator=(media_packet&& packet) noexcept;

        ~media_packet();

        AVPacket* get_packet();

        explicit operator bool() const noexcept;

    private:
        AVPacket* m_packet{};
    };
} // utils

#endif //MEDIA_PACKET_H
